import request from '@/utils/request'

export function listcategoryMapping(query) {
  return request({
    url: '/categoryMapping/list',
    method: 'get',
    params: query
  })
}

export function createcategoryMapping(data) {
  return request({
    url: '/categoryMapping/create',
    method: 'post',
    data
  })
}

export function readcategoryMapping(data) {
  return request({
    url: '/categoryMapping/get/' + data.id,
    method: 'get'
  })
}

export function updatecategoryMapping(data) {
  return request({
    url: '/categoryMapping/update',
    method: 'post',
    data
  })
}

export function deletecategoryMapping(data) {
  return request({
    url: '/categoryMapping/delete/' + data.id,
    method: 'delete'
  })
}

export function setStatus(data) {
  return request({
    url: '/categoryMapping/setStatus',
    method: 'post',
    data
  })
}
